<template>
  <a-drawer
    width="60%"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{ height: 'calc(100vh - 100px)', overflow: 'auto' }"
    @close="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32">
          <a-col :span="12">
            <a-form-model-item label="标题" prop="title">
              <a-input v-model="form.title" placeholder="请输入标题" disabled />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="附件" prop="fileName">
              <span v-for="(item, index) in fileList" :key="index">
                <a :href="item.fileUrl" target="_blank">{{ item.fileName }}</a>
                <br />
              </span>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="32">
          <a-col :span="12">
            <a-form-model-item label="督办企业" prop="deptIds">
              <a-tree-select
                v-model="form.deptIds"
                placeholder="请选择所属单位"
                :tree-data="deptOptions"
                tree-default-expand-all
                :replaceFields="{
                  children: 'children',
                  title: 'title',
                  key: 'id',
                  value: 'id',
                }"
                allow-clear
                multiple
                @change="onTreeChange"
                @select="onSelect"
                disabled
              >
              </a-tree-select>
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="32">
          <a-col :span="24">
            <a-tabs>
              <a-tab-pane key="1" tab="内容详情">
                <a-textarea
                  v-model="form.content"
                  placeholder="请输入内容详情"
                  :auto-size="{ minRows: 27, maxRows: 38 }"
                  disabled
                ></a-textarea>
              </a-tab-pane>
              <a-tab-pane key="2" tab="回执详情">
                <LinshideptList :linshiManageId="form.id" />
              </a-tab-pane>
            </a-tabs>
          </a-col>
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button type="primary" @click="cancel"> 关 闭 </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import BizLinshiManageEditForm from "./BizLinshiManageForm";
export default {
  ...BizLinshiManageEditForm,
};
</script>
